package com.app.shortvideo.utils

import android.app.Activity
import android.webkit.JavascriptInterface
import android.webkit.WebView
import com.app.library.utils.BrowserUtil
import com.blankj.utilcode.util.LogUtils

class WebJavascriptInterface(private val webView: WebView, private val act: Activity) {

    @JavascriptInterface
    fun openExternalWeb(url: String?) {
        BrowserUtil.openBrowser(url, act)
    }

    private fun loadNFTPaid(orderId: String, amount: String) {
        LogUtils.d("loadNFTPaid   orderId:$orderId   amount:$amount")
        webView.loadUrl("javascript:NFTPaid($orderId,$amount)")
    }
}